import { MockRequest } from '@delon/mock'
import { IReportSetting, IReportReleaseRecordPagination, IReportSettingPagination, IReportReleaseRecord } from '@shared/interfaces/report'
import { EReportType, EReportStatus } from '@shared/enums'
import { IPagination } from '@shared/interfaces/pagination'

const releaseList: IReportReleaseRecord[] = [
  {
    id: '5cd92babfa6a5a43f60f9068',
    rptCd: 'TEST',
    rptName: 'TEST_Name',
    rptType: EReportType.Standard,
    rptFmt: '.xlsx',
    rptLevel: 'Acquirer',
    rptLevelCode: '00000013',
    rptLevelName: '测试机构',
    rptKey: 'xxxx',
    status: EReportStatus.Normal,
    createdAt: '2019-05-13T16:32:43.621+08:00',
    updatedAt: '2019-05-13T16:33:43.621+08:00',
    rptCreateTime: '2019-05-13T19:33:43.621+08:00',
  },
]

const genReportReleaseList = (params: any): IReportSettingPagination => {
  return {
    total: releaseList.length,
    data: releaseList,
    size: 10,
    count: 10,
    page: 1,
  }
}

export const REPORT = {
  '/report': (req: MockRequest) => genReportReleaseList(req.queryString),
}
